
#include "stdafx.h"
#include "WicBitmapEncoderInfo.h"

CWicBitmapEncoderInfo::CWicBitmapEncoderInfo()
{
    m_pIWICBitmapEncoderInfo = NULL;
}

CWicBitmapEncoderInfo::~CWicBitmapEncoderInfo()
{
    if(m_pIWICBitmapEncoderInfo)
    {
        m_pIWICBitmapEncoderInfo->Release();
    }
    m_pIWICBitmapEncoderInfo = NULL;
}

CWicBitmapEncoderInfo::CWicBitmapEncoderInfo(CWicBitmapEncoderInfo const & objBitmapEncoderInfo)
{
    m_pIWICBitmapEncoderInfo = objBitmapEncoderInfo.m_pIWICBitmapEncoderInfo;
    m_pIWICBitmapEncoderInfo->AddRef();
}

CWicBitmapEncoderInfo& CWicBitmapEncoderInfo::operator=(CWicBitmapEncoderInfo const & objBitmapEncoderInfo)
{
    if(m_pIWICBitmapEncoderInfo)
    {
        m_pIWICBitmapEncoderInfo->Release();
    }
    m_pIWICBitmapEncoderInfo = objBitmapEncoderInfo.m_pIWICBitmapEncoderInfo;
    m_pIWICBitmapEncoderInfo->AddRef();
    return *this;
}
